import requests
import lxml.etree as le
import pandas as pd

url = 'https://www.runoob.com/html/html-tutorial.html'

x = '//div[@id="leftcolumn"]/a/text()'
y = '//div[@id="leftcolumn"]/a/@href'

content = requests.get(url=url).content
contentx = le.HTML(content)

rets = contentx.xpath(x)
la = contentx.xpath(y)
data1 = []
data2 = []
for category1 in rets:
    data1.append(category1.strip())

for category2 in la:
    data2.append(url+category2.strip())

data = list(zip(data1, data2))
data = pd.DataFrame(data, columns=['contents', 'url'])

writer = pd.ExcelWriter('Xpath_Test.xlsx')
data.to_excel(writer, sheet_name='runoob_com')
writer.save()